package com.ddwl.schema.bo.goods.retail;

import com.ddwl.schema.bo.distr.SetGoodsProfitBo;
import com.ddwl.schema.bo.goods.ItemMediaBo;
import com.ddwl.schema.bo.goods.SkuBo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Author hemiaojun
 * @Date 2020/12/2 13:41
 */
@Getter
@Setter
@ApiModel("店铺商品修改bo")
public class ShopItemUpdateBo {

    @NotNull
    @ApiModelProperty("id")
    private String id;

    @NotNull(message = "商品名称不能为空")
    @ApiModelProperty("商品名称")
    private String itemName;

    @NotNull(message = "销售价不能为空")
    @DecimalMin(value = "0.01",message = "销售价不能小于0.01")
    @DecimalMax(value = "10000000.00",message = "销售价不能大于10000000.00")
    @ApiModelProperty("销售价")
    private BigDecimal retailPrice;

    @DecimalMin(value = "0.01",message = "优惠价不能小于0.01")
    @DecimalMax(value = "10000000.00",message = "优惠价不能大于10000000.00")
    @ApiModelProperty("优惠价")
    private BigDecimal originPrice;

    @DecimalMin(value = "0.01",message = "成本价不能小于0.01")
    @DecimalMax(value = "10000000.00",message = "成本价不能大于10000000.00")
    @ApiModelProperty("成本价")
    private BigDecimal vipPrice;

    @ApiModelProperty("分享描述")
    private String shareDesc;

    @NotNull(message = "商品描述不能为空")
    @ApiModelProperty("商品描述")
    private String itemDesc;

    @ApiModelProperty("商品排序")
    private Integer itemSort;

    @ApiModelProperty("商品状态 0下架 1上架")
    private Integer itemStatus;

    @ApiModelProperty("商品编码")
    private String itemCode;

    @ApiModelProperty("商品条码")
    private String barcode;

    @ApiModelProperty("库存")
    private Integer stock;

    @ApiModelProperty("属性列表")
    private String attributeList;

    @Valid
    @ApiModelProperty("sku信息")
    private List<SkuBo> skus;

    @Valid
    @ApiModelProperty("商品图片")
    @NotNull(message = "商品图片不能为空")
    @Size(min = 1,max = 7, message ="商品图片最少一张，最多6张,视频最多1个")
    private List<ItemMediaBo> medias;

    @ApiModelProperty("主图视频")
    private String itemVideo;

    @NotNull(message = "分类id不能为空")
    @ApiModelProperty("分类id")
    private String categoryId;

    @ApiModelProperty("参数详情")
    private String paramDetail;

    @ApiModelProperty("规格类型 0：单规格，1：多规格")
    private Integer skuType;

    @ApiModelProperty("商品分润信息")
    private SetGoodsProfitBo goodsProfitBo;
    /**
     * 店铺id
     */
    @NotNull(message = "店铺id不能为空")
    @ApiModelProperty(value = "店铺id")
    private String shopId;

    @ApiModelProperty("热卖商品标识：0：否，1：是")
    private Integer hotFlag;

    @ApiModelProperty(value = "是否限购，0否 1是",required = true)
    private Integer limitFlag;

    @ApiModelProperty("限购数量 如果 [是否限购]的值为1，则该项必填")
    private Integer limitQuantity;

    /**
     * 是否推荐
     */
    @ApiModelProperty("是否推荐")
    private Boolean recommend;

}
